package com.koi.pojo.system;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.validation.constraints.NotBlank;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * @author ･ᴗ･
 * @description [字典类型表模型]
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("sys_dict_type")
public class SysDictType implements Serializable {

    /**
     * 字典主键
     */
    @TableId(value = "dict_id", type = IdType.ASSIGN_ID)
    private Long dictId;

    /**
     * 字典类型
     */
    @NotBlank(message = "字典类型不能为空")
    @TableField("dict_type")
    private String dictType;

    /**
     * 字典名称
     */
    @NotBlank(message = "字典名称不能为空")
    @TableField("dict_name")
    private String dictName;

    /**
     * 字典状态[0-正常 1-停用]
     */
    @NotBlank(message = "字典状态不能为空")
    @TableField("dict_status")
    private String dictStatus;

    /**
     * 创建者
     */
    @TableField("create_by")
    private String createBy;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    /**
     * 更新者
     */
    @TableField("update_by")
    private String updateBy;

    /**
     * 更新时间
     */
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;

    /**
     * 备注
     */
    @TableField("remark")
    private String remark;
}
